package pyip.lib.javalearn.classloader.load.rule;

public class A implements IA {
    static {
        System.out.println("static A......");
        // B b = new B();
        B b = null;
        try {
            b = (B) Class.forName("pyip.lib.javalearn.classloader.load.rule.B").newInstance();
            System.out.println("A - b classLoader: " + b.getClass().getClassLoader());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public A() {
        System.out.println("A constructor.......");
    }

    public void print() {
        System.out.println("use A.......");
    }

    public void doNothing() {
    }

}